package com.kgc.basic.remote;

import com.kgc.basic.pojo.Good;
import com.kgc.basic.util.ResponseMsg;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

public interface GoodRemote {
    @RequestMapping("getGoodPage")
    @ResponseBody
    ResponseMsg getGoodPage(@RequestBody Map<String, Object> map);
    @RequestMapping("getAll")
    @ResponseBody
    ResponseMsg getAllGood(@RequestBody Map<String, Object> map);
    @RequestMapping("addGood")
    @ResponseBody
    ResponseMsg addGood(@RequestBody Good good);
    @RequestMapping("updateGood")
    @ResponseBody
    ResponseMsg updateGood(@RequestBody Good good);
    @RequestMapping("delGood")
    @ResponseBody
    ResponseMsg delGood(@RequestParam("id") String id);
    @RequestMapping("getGoodById")
    @ResponseBody
    public ResponseMsg getGoodById(@RequestParam("id") String id);
    @RequestMapping("getGoodList")
    @ResponseBody
    public ResponseMsg getGoodList(@RequestBody List<String> idList);
    @RequestMapping("changeStock")
    @ResponseBody
    public ResponseMsg changeStock(@RequestBody Map<String, Object> map);
}
